3.825 \(\int \frac{\sec ^2(c+d x) \tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=73 \[ \frac{\tan ^5(c+d x)}{5 a d}+\frac{\tan ^3(c+d x)}{3 a d}-\frac{\sec ^5(c+d x)}{5 a d}+\frac{\sec ^3(c+d x)}{3 a d} \]

[Out]

Sec[c + d*x]^3/(3*a*d) - Sec[c + d*x]^5/(5*a*d) + Tan[c + d*x]^3/(3*a*d) + Tan[c + d*x]^5/(5*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.159939, antiderivative size = 73, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.138, Rules used = {2839, 2607, 14, 2606} \[ \frac{\tan ^5(c+d x)}{5 a d}+\frac{\tan ^3(c+d x)}{3 a d}-\frac{\sec ^5(c+d x)}{5 a d}+\frac{\sec ^3(c+d x)}{3 a d} \]

Antiderivative was successfully verified.

[In]

Int[(Sec[c + d*x]^2*Tan[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

Sec[c + d*x]^3/(3*a*d) - Sec[c + d*x]^5/(5*a*d) + Tan[c + d*x]^3/(3*a*d) + Tan[c + d*x]^5/(5*a*d)

Rule 2839

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rubi steps

\begin{align*} \int \frac{\sec ^2(c+d x) \tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac{\int \sec ^4(c+d x) \tan ^2(c+d x) \, dx}{a}-\frac{\int \sec ^3(c+d x) \tan ^3(c+d x) \, dx}{a}\\ &=-\frac{\operatorname{Subst}\left (\int x^2 \left (-1+x^2\right ) \, dx,x,\sec (c+d x)\right )}{a d}+\frac{\operatorname{Subst}\left (\int x^2 \left (1+x^2\right ) \, dx,x,\tan (c+d x)\right )}{a d}\\ &=-\frac{\operatorname{Subst}\left (\int \left (-x^2+x^4\right ) \, dx,x,\sec (c+d x)\right )}{a d}+\frac{\operatorname{Subst}\left (\int \left (x^2+x^4\right ) \, dx,x,\tan (c+d x)\right )}{a d}\\ &=\frac{\sec ^3(c+d x)}{3 a d}-\frac{\sec ^5(c+d x)}{5 a d}+\frac{\tan ^3(c+d x)}{3 a d}+\frac{\tan ^5(c+d x)}{5 a d}\\ \end{align*}

Mathematica [A]  time = 0.332771, size = 106, normalized size = 1.45 \[ -\frac{\sec ^3(c+d x) (-224 \sin (c+d x)+22 \sin (2 (c+d x))+32 \sin (3 (c+d x))+11 \sin (4 (c+d x))+66 \cos (c+d x)-32 \cos (2 (c+d x))+22 \cos (3 (c+d x))-16 \cos (4 (c+d x))-80)}{960 a d (\sin (c+d x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sec[c + d*x]^2*Tan[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

-(Sec[c + d*x]^3*(-80 + 66*Cos[c + d*x] - 32*Cos[2*(c + d*x)] + 22*Cos[3*(c + d*x)] - 16*Cos[4*(c + d*x)] - 22
4*Sin[c + d*x] + 22*Sin[2*(c + d*x)] + 32*Sin[3*(c + d*x)] + 11*Sin[4*(c + d*x)]))/(960*a*d*(1 + Sin[c + d*x])
)

________________________________________________________________________________________

Maple [A]  time = 0.074, size = 130, normalized size = 1.8 \begin{align*} 8\,{\frac{1}{da} \left ( -1/48\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -1 \right ) ^{-3}-1/32\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -1 \right ) ^{-2}-{\frac{1}{64\,\tan \left ( 1/2\,dx+c/2 \right ) -64}}-1/20\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +1 \right ) ^{-5}+1/8\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +1 \right ) ^{-4}-1/8\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +1 \right ) ^{-3}+1/16\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +1 \right ) ^{-2}+{\frac{1}{64\,\tan \left ( 1/2\,dx+c/2 \right ) +64}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4*sin(d*x+c)^2/(a+a*sin(d*x+c)),x)

[Out]

8/d/a*(-1/48/(tan(1/2*d*x+1/2*c)-1)^3-1/32/(tan(1/2*d*x+1/2*c)-1)^2-1/64/(tan(1/2*d*x+1/2*c)-1)-1/20/(tan(1/2*
d*x+1/2*c)+1)^5+1/8/(tan(1/2*d*x+1/2*c)+1)^4-1/8/(tan(1/2*d*x+1/2*c)+1)^3+1/16/(tan(1/2*d*x+1/2*c)+1)^2+1/64/(
tan(1/2*d*x+1/2*c)+1))

________________________________________________________________________________________

Maxima [B]  time = 1.0749, size = 343, normalized size = 4.7 \begin{align*} \frac{4 \,{\left (\frac{2 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{2 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac{4 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac{5 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac{10 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + 1\right )}}{15 \,{\left (a + \frac{2 \, a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{2 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac{6 \, a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac{6 \, a \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac{2 \, a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac{2 \, a \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac{a \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}\right )} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

4/15*(2*sin(d*x + c)/(cos(d*x + c) + 1) - 2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 4*sin(d*x + c)^3/(cos(d*x +
c) + 1)^3 + 5*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 10*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 1)/((a + 2*a*sin(
d*x + c)/(cos(d*x + c) + 1) - 2*a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 6*a*sin(d*x + c)^3/(cos(d*x + c) + 1)^
3 + 6*a*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 2*a*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 2*a*sin(d*x + c)^7/(co
s(d*x + c) + 1)^7 - a*sin(d*x + c)^8/(cos(d*x + c) + 1)^8)*d)

________________________________________________________________________________________

Fricas [A]  time = 1.37406, size = 188, normalized size = 2.58 \begin{align*} \frac{2 \, \cos \left (d x + c\right )^{4} - \cos \left (d x + c\right )^{2} - 2 \,{\left (\cos \left (d x + c\right )^{2} - 2\right )} \sin \left (d x + c\right ) + 1}{15 \,{\left (a d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) + a d \cos \left (d x + c\right )^{3}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/15*(2*cos(d*x + c)^4 - cos(d*x + c)^2 - 2*(cos(d*x + c)^2 - 2)*sin(d*x + c) + 1)/(a*d*cos(d*x + c)^3*sin(d*x
 + c) + a*d*cos(d*x + c)^3)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4*sin(d*x+c)**2/(a+a*sin(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.25863, size = 147, normalized size = 2.01 \begin{align*} -\frac{\frac{5 \,{\left (3 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}}{a{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1\right )}^{3}} - \frac{3 \,{\left (5 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 40 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 50 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 40 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 9\right )}}{a{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1\right )}^{5}}}{120 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/120*(5*(3*tan(1/2*d*x + 1/2*c)^2 + 1)/(a*(tan(1/2*d*x + 1/2*c) - 1)^3) - 3*(5*tan(1/2*d*x + 1/2*c)^4 + 40*t
an(1/2*d*x + 1/2*c)^3 + 50*tan(1/2*d*x + 1/2*c)^2 + 40*tan(1/2*d*x + 1/2*c) + 9)/(a*(tan(1/2*d*x + 1/2*c) + 1)
^5))/d